<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/crm/lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/crm/css/public.css" media="all">
    <link rel="stylesheet" href="/static/crm/lib/font-awesome-4.7.0/css/font-awesome.min.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>

<body>
    <div class="layui-form layuimini-form layui-container">
        <form class="layui-form">
            <div class="layui-form-item">
                <label class="layui-form-label">回款编号：</label>
                <div class="layui-input-block">
                    <input type="hidden" name="__token__" value="{$Request.token}" />
                    <input type="text" name="number" autocomplete="off" class="layui-input">
                    <span><button class="layiu-btu layui-btn layui-btn-sm layui-btn-black " id="number-create" type="button" id="number-create">生成</button></span>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">选择客户：</label>
                <div class="layui-input-block">
                    <select id="demoReload" name="status" lay-verify="">
                        <option value=""></option>
                    </select>

                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">选择合同：</label>
                <div class="layui-input-block">
                    <input type="text" name="business" autocomplete="off"  class="layui-input">
                    <a id="bus" class="layui-btn layui-btn-sm layui-btn-black " >服务</a>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
                    <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </form>
    </div>
    <script src="/static/crm/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
    <script>
        layui.use(['form','jquery', 'layer'], function () {
            var form = layui.form,
                layer = layui.layer,
                $ = layui.jquery;

            //监听提交
            form.on('submit(saveBtn)', function (data) {
                $.ajax({
                    url: '/crm/product.course/addData',
                    type: 'POST',
                    dataType: 'json',
                    data: data.field,
                    // data: JSON.stringify(data.field),
                    success: function (res) {
                        if (res.code == 1) {
                            layer.msg(res.msg, {
                                time: 3000
                            }, function () {
                                // 关闭弹出层
                                var iframeIndex = parent.layer.getFrameIndex(window.name);
                                parent.layer.close(iframeIndex);
                            });
                        }
                        layer.msg(res.msg);
                    }
                })
                return false;
            });
            // form.on('submit(campusAdd)', function (data) {
            //     openLayer('/crm/product.campus/add', '添加校区');
            //     return false;
            // });
            // form.on('submit(majorAdd)', function (data) {
            //     openLayer('/crm/product.major/add', '添加专业');
            //     return false;
            // });

            // 弹出层
      
        
        });
    </script>
</body>

</html>